﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace console.demo
{
    public class RegexExpress
    {
        public RegexExpress() { }
        public void get()
        {
            string input = "";
            string pattern = @"(?<=19)\d{2}\b";
            foreach (Match match in Regex.Matches(input, pattern))
            {
                Console.WriteLine(match.Value);
            }
        }

        public static void showMatch(string txt, string expr)
        {
            Console.WriteLine(expr);
            MatchCollection matchCollection = Regex.Matches(txt, expr);
            foreach (Match match in matchCollection)
            {
                Console.WriteLine(match.Value);
            }
        }
    }
}
